import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { CouponInfoService } from './coupon_info.service';
import { CreateCouponInfoDto } from './dto/create-coupon_info.dto';
import { UpdateCouponInfoDto } from './dto/update-coupon_info.dto';

@Controller('coupon-info')
export class CouponInfoController {
  constructor(private readonly couponInfoService: CouponInfoService) {}


  @Post()
  create(@Body() createCouponInfoDto: CreateCouponInfoDto) {
    return this.couponInfoService.create(createCouponInfoDto);
  }

  @Get()
  findAll() {
    return this.couponInfoService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.couponInfoService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateCouponInfoDto: UpdateCouponInfoDto) {
    return this.couponInfoService.update(+id, updateCouponInfoDto);
  }


  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.couponInfoService.remove(+id);
  }
}
